To export a code to TestNG, you need to:
Get the test code in Java language.
Integrate Silk Mobile and TestNG.
Following is a step-by-step description of how to do it.
Get test code in Java
In Silk Mobile go to the "Code" tab and select TestNG.
The test in the requested code language will show up and you can copy it to clipboard using the “Copy to clipboard” button.
Integration of Silk Mobile with TestNG
Step 1: Create Java project.
Step 2: Integration is achieved via built-in jar files located in your installation directory at ...\clients\java.
Right click on the project. Choose configure build path >> Libraries.
Step 3: Add the following external jars:
imageClient.jar
ws-commons-util-1.0.2.jar
xmlrpc-client-3.1.2.jar
xmlrpc-common-3.1.2.jar
Step 4: Add the library TestNG